import request from '@/utils/request'
import { praseStrEmpty } from '../../utils/ruoyi'

// 查询活动列表
export function listResource(query) {
  return request({
    url: '/system/resource/list',
    method: 'get',
    params: query
  })

}
// 查询活动详细
export function getResource(id) {
  return request({
    url: '/system/resource/' + praseStrEmpty(id),
    method: 'get',
  })

}
// 新增活动
export function addResource(data) {
  return request({
    url: '/system/resource/',
    method: 'post',
    data:data
  })

}

// 修改活动
export function updateResource(data) {
  return request({
    url: '/system/resource/',
    method: 'put',
    data:data
  })

}

// 删除活动
export function delResource(id) {
  return request({
    url: '/system/resource/' +id,
    method: 'delete',
  })

}


